package com.morder.activity;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.morder.R;
import com.morder.application.AppPreference;
import com.morder.application.BuildConfig;

public class SetPwdActivity extends Activity implements OnClickListener {

  private Button mSubmitPwd;
  
  protected void onCreate(android.os.Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.set_pwd_activity);
    mSubmitPwd = (Button) findViewById(R.id.submit_pwd);
    mSubmitPwd.setOnClickListener(this);
  }

  @Override
  public void onClick(View v) {
    switch (v.getId()) {
    case R.id.submit_pwd:
      Intent i = new Intent(BuildConfig.REGISTER_SUCCESS);
      i.putExtra("msg", "close");
      sendBroadcast(i);
      AppPreference.markLoginSuccess(true);
      Intent intent = new Intent(this, NavigationActivity.class);
      startActivity(intent);
      finish();
      break;

    default:
      break;
    }
  }
}
